<script>
	export default {
		onLaunch: function() {
			
		},
		onShow: function() {
			// // #ifdef H5
			// let isTouristFlag = uni.getStorageSync('isTourist');
			// console.log(isTouristFlag , '===isTouristFlag====111')
			// if (isTouristFlag) {
			// 	this.setupTabBarClickMonitor()
			// 	this.initTabBarStatus() // 初始化TabBar状态
			// }
			// // #endif
		},
		onHide: function() {
			// console.log('App Hide')
		},
		methods: {
			// initTabBarStatus() {
			//     const tabItems = document.querySelectorAll('.uni-tabbar__item')
			//     if (tabItems.length > 3) {
			//       // 禁用第3个(index=2)和第4个(index=3)Tab
			//       tabItems[2].classList.add('disabled')
			//       tabItems[2].style.pointerEvents = 'none'
			//       tabItems[2].style.opacity = '0.5'
			      
			//       tabItems[3].classList.add('disabled')
			//       tabItems[3].style.pointerEvents = 'none'
			//       tabItems[3].style.opacity = '0.5'
			//     }
			// },
			// setupTabBarClickMonitor() {
			//     document.addEventListener('click', (e) => {
			//       const tabBar = document.querySelector('.uni-tabbar')
			//       if (!tabBar) return
			      
			//       if (tabBar.contains(e.target)) {
			//         const tabItem = e.target.closest('.uni-tabbar__item')
			//         if (!tabItem) return
			        
			//         const index = Array.from(tabItem.parentNode.children).indexOf(tabItem)
			//         const isClickable = this.isTabItemClickable(tabItem)
			        
			//         if (index === 2 || index === 3 || !isClickable) {
			// 		  alert("当前登录者是游客，暂无权限")
			//           e.preventDefault()
			//           e.stopPropagation()
			//           e.stopImmediatePropagation()
			          
			//           // 添加点击反馈效果
			//           tabItem.style.transform = 'scale(0.95)'
			//           setTimeout(() => {
			//             tabItem.style.transform = ''
			//           }, 200)
			//         }
			//       }
			//     }, true)
			// },
			// isTabItemClickable(tabItem) {
			//     const style = window.getComputedStyle(tabItem)
			//     return (
			//       style.pointerEvents !== 'none' &&
			//       style.cursor !== 'not-allowed' &&
			//       !tabItem.classList.contains('disabled') &&
			//       parseFloat(style.opacity) > 0.1
			//     )
			// },
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	
	.u-form-item__body__right__message {
		margin-left: 10px !important;
	}
	.flex {
		display: flex;
	}
	.flex1 {
		flex: 1;
	}
	.block {
		display: block !important;
	}
	.pr{
		position: relative;
	}
	.uSearch {
		position: relative;
	}
	.uSearch .u-content {
		border: 4rpx solid rgb(36, 36, 36) !important;
	}
	.uSearch .u-input {
	    margin: 0 16rpx !important;
	}
	.uSearch .u-content {
	    padding: 0 24rpx !important;
	}
	.uSearch .u-content {
	    padding: 0 24rpx !important;
	}
	.uSearch.seviceSearch .u-content {
		padding: 0 0 0 180rpx !important;
	}
	.u-loadmore__content__text {
		font-size: 14px !important;
	}
	// 暂无数据
	.noData {
		width: 320rpx;
		height: 320rpx;
	}
	.none-data {
		text-align: center;
		position: absolute;
		left: 50%;
		top: calc(50% - 129rpx);
		/* #ifdef MP */
		top: calc(50% - 172rpx);
		/* #endif */
		transform: translate(-50%);
	}
	.space-between {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.flex3 {
		flex: 3 !important
	}
	.uModals .u-popup__content {
		border-radius: 20rpx !important;
	}
	
</style>
